//****************************************************
// Porman Project 
// Filename: CRenderCamera.cpp
// Date: 2011/01/17
// Author: KengYu Lin
// Modify:
//****************************************************
#include "CRenderCamera.h"

namespace Porman
{

namespace RS
{

CRenderCamera::CRenderCamera( const std::string& sName, unsigned int uiHash ) :
CRenderBase(sName, uiHash),
m_hCameraData()
{
}

CRenderCamera::~CRenderCamera( void )
{
}

void CRenderCamera::initial( void )
{
    m_hCameraData.getData().m_mat4x4ViewMatrix = glm::mat4x4();
    m_hCameraData.getData().m_mat4x4ProjMatrix = glm::mat4x4();
    m_hCameraData.getData().m_vectRenderUnities.clear();
}

glm::mat4x4& CRenderCamera::getProjMatrix( void )
{
    return m_hCameraData.getData().m_mat4x4ProjMatrix;
}

glm::mat4x4* CRenderCamera::getProjMatrixRef( void )
{
    return &m_hCameraData.getData().m_mat4x4ProjMatrix;
}

glm::mat4x4& CRenderCamera::getViewMatrix( void )
{
    return m_hCameraData.getData().m_mat4x4ViewMatrix; 
}

glm::mat4x4* CRenderCamera::getViewMatrixRef( void )
{
    return &m_hCameraData.getData().m_mat4x4ViewMatrix; 
}

CRenderUnityList& CRenderCamera::getRenderUnityList( void )
{
    return m_hCameraData.getData().m_vectRenderUnities;
}

CRenderUnityList* CRenderCamera::getRenderUnityListRef( void )
{
    return &m_hCameraData.getData().m_vectRenderUnities;
}

void CRenderCamera::onSwap( void )
{
    m_hCameraData.getRenderData().m_vectRenderUnities.clear();
    m_hCameraData.swap();
}

void CRenderCamera::onRender( void )
{
}

}//End RS

}//End namespace Porman